<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8" import="com.zjr.domain.*"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>修改用户信息</title>
<link type="text/css" rel="stylesheet" href="<%=path %>/skin/css/base_style.css" />
<link type="text/css" rel="stylesheet" href="<%=path %>/skin/css/form.css" />
<script type="text/javascript" src="<%=path %>/skin/js/jquery-1.7.1.js"></script>
<script type="text/javascript" src="<%=path %>/skin/js/form.js"></script>
<% 
	HttpSession userSession = request.getSession();
	User user = (User)userSession.getAttribute("user");
	String flag = "selected";
%>
</head>
<body>
<form action="<%=path %>/UserServlet?flag=modify" class="fm" method="post">
	<table class="fm_tab" align="center">
		<tr>
			<td width="15%" class="fm_td1 fyh"><img src="<%=path %>/skin/images/form_img_03.png" class="fm_mid"/><span class="fm_text">用户名：</span></td>
			<td width="35%" class="fm_td2"><input type="text" name="username" value="<%=user.getUsername() %>" class="fm_tt1" style="width:80%" readonly /></td>
		</tr>
		<tr>
			<td width="15%" class="fm_td1 fyh"><img src="<%=path %>/skin/images/form_img_03.png" class="fm_mid"/><span class="fm_text">密码：</span></td>
			<td width="35%" class="fm_td2"><input type="text" name="password" value="<%=user.getPassword() %>" class="fm_tt1" style="width:80%"/></td>
		</tr>
		<tr>
			<td width="15%" class="fm_td1 fyh"><img src="<%=path %>/skin/images/form_img_03.png" class="fm_mid"/><span class="fm_text">部门：</span></td>
			<td width="35%" class="fm_td2">
				<select name="department" >
					<option value="1" <%=user.getDid() == 1 ? flag : "" %>>技术部</option>
					<option value="2" <%=user.getDid() == 2 ? flag : "" %>>研发部</option>
					<option value="3" <%=user.getDid() == 3 ? flag : "" %>>人事部</option>
					<option value="4" <%=user.getDid() == 4 ? flag : "" %>>财务部</option>
					<option value="5" <%=user.getDid() == 5 ? flag : "" %>>行政部</option>
				</select>
			</td>
		</tr>
		<tr>
			<td width="15%" class="fm_td1 fyh"><img src="<%=path %>/skin/images/form_img_03.png" class="fm_mid"/><span class="fm_text">地址：</span></td>
			<td width="35%" class="fm_td2"><input type="text" name="address" value="<%=user.getAddress() %>" class="fm_tt1" style="width:80%"/></td>
		</tr>
		<tr>
			<td width="15%" class="fm_td1 fyh"><img src="<%=path %>/skin/images/form_img_03.png" class="fm_mid"/><span class="fm_text">手机号：</span></td>
			<td width="35%" class="fm_td2"><input type="text" name="phone" value="<%=user.getPhone() %>" class="fm_tt1" style="width:80%"/></td>
		</tr>
		<tr>
			<td width="15%" class="fm_td1 fyh"><img src="<%=path %>/skin/images/form_img_03.png" class="fm_mid"/><span class="fm_text">职位：</span></td>
			<td width="35%" class="fm_td2">
				<select name="position" >
					<option value="0" <%=user.getPosition() == 0 ? flag : "" %>>员工</option>
					<option value="1" <%=user.getPosition() == 1 ? flag : "" %>>部长</option>
					<option value="2" <%=user.getPosition() == 2 ? flag : "" %>>总经理</option>
				</select>
			</td>
		</tr>
		<tr>
         	<td class="fm_td5" colspan="4">
         		<input type="submit" class="fm_button fyh" value="提&nbsp;&nbsp;&nbsp;&nbsp;交"/>
            </td>
         </tr>
	</table>
</form>
</body>
</html>